package Test;

import org.junit.Test;
import static org.junit.Assert.*;
import Task25.Controller;

public class cdTest {

	@Test
	public void cdAbs() {
		String newWD = "C:\\Test\\Test1";
		String[] command = { "cd", newWD };
		String[] getNewWD = Controller.gui(command);
		assertEquals(getNewWD[0], newWD);
	}

	@Test
	public void cdRel() {
		// change the work directory on the Test
		Controller.gui(new String[] { "cd", "C:\\Test" });
		String newWD = "Test1";
		String[] command = { "cd", newWD };
		String[] getNewWD = Controller.gui(command);
		assertEquals(getNewWD[0], "C:\\Test\\" + newWD);
	}
}
